﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"/>
    <title>考核规则</title>
    <script language="JavaScript" src="../../Comm/JScript.js" type="text/javascript" ></script>
    <script type="text/javascript" src="../../Scripts/bootstrap/js/jquery.min.js"></script>
    <script src="../../Scripts/QueryString.js" type="text/javascript"></script>
    <link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet"  type="text/css" />

    <!-- 引用通用的js文件. -->
    <script type="text/javascript" src="../../Scripts/config.js"></script>
    <script type="text/javascript" src="../../Comm/Gener.js"></script>
    <script type="text/javascript" language="javascript" >
        //页面启动函数.
        $(function () {

            $("#Msg").html("正在加载,请稍后......");

            //初始化groupID.
            var nodeID = GetQueryString("FK_Node");

            //调用公共类库的方法.
            GenerBindEnumKey("DDL_TWay", "TWay", "1");

            //执行.
            var node = new Entity("BP.WF.Node", nodeID);

            //调用公共类库的方法:执行批量主表赋值
            GenerFullAllCtrlsVal(node);

            var str = $("#TB_TimeLimit").val();
            if (str == null || str == "")
                $("#TB_TimeLimit").val(0);

            str = $("#TBPara_TimeLimitHH").val();
            if (str == null || str == "")
                $("#TBPara_TimeLimitHH").val(0);

            str = $("#TBPara_TimeLimitMM").val();
            if (str == null || str == "")
                $("#TBPara_TimeLimitMM").val(0);

        });
    </script>
</head>
<body>

<form id="cc">

<table style="width:100%;">
 <caption>设置考核规则</caption>

<tr>
<td> 
<fieldset>
<legend> <input type=radio value="0"  id="RB_CHWay_0" name="RB_CHWay" > <label for="RB_CHWay_0">不考核 </label> </legend>
<ul >
<li style=" color:Gray">默认为不考核，当前节点不设置任何形式的考核。</li>
</ul>
</fieldset>

<fieldset>
<legend><input type="radio" value="1"  id="RB_CHWay_1" name="RB_CHWay" > <label for="RB_CHWay_1">按时效考核 </label></legend>

<table style=" width:100%;">
<tr>
<td nowarp=true> 限期完成时限：</td>
<td> <input type=text id="TB_TimeLimit" name="TB_TimeLimit" style="width:30px;" />天,</td>
<td><input type=text id="TBPara_TimeLimitHH" name="TBPara_TimeLimitHH" style="width:30px;" />小时,</td>
<td style=" color:Gray"><input type=text id="TBPara_TimeLimitMM" name="TBPara_TimeLimitMM" style="width:30px;" />分钟</td>
</tr>
<!--
<tr>
<td>预警：</td>
<td>  <input type=text id="TB_WarningDay" name="TB_WarningDay" /> 天,</td>
<td> 天数 </td>
<td style=" color:Gray">天数</td>
</tr>
-->
<tr>
<td>节假日</td>

<td> 
<select name="DDL_TWay" id="DDL_TWay" > </select> 
    </td>

<td colspan="2"  >
<a href="javascript:WinOpen('../../Comm/Sys/Holiday.htm');" > 节假日维护</a>

</td>
</tr>

<!--
<tr>
<td> 扣分</td>
<td> <input type=text id="TB_TCent" name="TB_TCent" /> 分</td>
<td colspan="2" style=" color:Gray">此分值可以作为时效考核的依据或者参考，每延期1小时的扣分。
<br />如果设置此分值，那末系统就会计算出来得分。该分值，可以转化为奖励或者罚款的金额。
</td>
</tr>
-->

</table>
</fieldset>
  
<fieldset>
<legend><input type="radio" value="2"  id="RB_CHWay_2" name="RB_CHWay" > <label for="RB_CHWay_2">按工作量考核 </label></legend>
<ul style=" color:Gray">
<li>按照处理工作的多少进行考核。</li>
<li>这样的节点，一般都是多人处理的节点。</li>
</ul>
</fieldset>


<fieldset>
<legend> 是否是质量考核点？</legend>

<ul style=" color:Gray">
<li>质量考核，是当前节点对上一步的工作进行一个工作好坏的一个考核。</li>
<li>考核的方式是对上一个节点进行打分，该分值记录到WF_CHEval的表里，开发人员对WF_CHEval的数据根据用户的需求进行二次处理。</li>
</ul>

<input type="checkbox" id="CB_IsEval" name="CB_IsEval" value="1"  /> <label for="CB_IsEval">是否是质量考核点?</label>
</fieldset>

<input type="button"  value="保存" onclick="Save()" />
</td>
 
</tr>
</table>

<script type="text/javascript">

    function Save() {

        var nodeID = GetQueryString("FK_Node");

        //执行查询.
        var node = new Entity("BP.WF.Node", nodeID);
        node.CopyForm(); //复制表单数据.

        //考核方式.
        var chWay = 0;
        if (document.getElementById("RB_CHWay_1").checked)
            chWay = 1;
        if (document.getElementById("RB_CHWay_2").checked)
            chWay = 2;
        node.CHWay = chWay;

        //节假日计算方式.
        node.TWay = $("#DDL_TWay").val(); //节假日考核方式.

        //是否是时效考核.
        if (document.getElementById("CB_IsEval").checked == true)
            node.IsEval = 1;
        else
            node.IsEval = 0;

        node.Update();

        window.location.href = window.location.href;
        return;
    }
</script>

</form>

</body>
</html>
